.container-fluid
  .row
    .col-sm-2
      = render 'admin/sidebar'
    .col-sm-10
      .my-panel
        %h2
          Roles
          %span.badge= @roles.count
          %button.btn.btn-default.pull-right{:'data-toggle' => 'modal', :'data-target' => '#newRoleModal'}
            New Role
        %table.table.table-hover
          %tbody
            - @roles.each do |role|
              %tr
                %td
                  = role
                  .btn-group.pull-right
                    = link_to glyphicon_span('remove'), {controller: 'welcome', action: 'setting_remove_role', role_name: role}, method: :post, data: { confirm: 'Are you sure?' }, class: 'btn btn-xs btn-default'
      %br
      .my-panel
        %h2
          Contest Categories
          %span.badge= @contest_categories.count
          %button.btn.btn-default.pull-right{:'data-toggle' => 'modal', :'data-target' => '#newCategoryModal'}
            New Category
        %table.table.table-hover
          %tbody
            - @contest_categories.each do |category|
              %tr
                %td
                  = category
                  .btn-group.pull-right
                    = link_to glyphicon_span('remove'), {controller: 'welcome', action: 'setting_remove_category', category_name: category}, method: :post, data: { confirm: 'Are you sure?' }, class: 'btn btn-xs btn-default'
.modal.fade#newRoleModal{:tabindex => '-1', :role => 'dialog', :'aria-labelledby' => 'newRoleModalLabel', :'aria-hidden' => 'true'}
  .modal-dialog
    .modal-content
      = form_tag do
        .modal-header
          %button.close{:type => 'button', :'data-dismiss' => 'modal'}
            %span{:'aria-hidden' => 'true'} &times;
            %span.sr-only Close
          %h4.modal-title#newRoleModalLabel New Role
        .modal-body
          = text_field_tag(:role_name, nil, placeholder: 'Please enter the new role name with dash', class: 'form-control', required: true)
        .modal-footer
          %button.btn.btn-default{:type => 'button', :'data-dismiss' => 'modal'} Close
          = submit_tag('Submit', class: 'btn btn-primary')
.modal.fade#newCategoryModal{:tabindex => '-1', :role => 'dialog', :'aria-labelledby' => 'newCategoryModalLabel', :'aria-hidden' => 'true'}
  .modal-dialog
    .modal-content
      = form_tag do
        .modal-header
          %button.close{:type => 'button', :'data-dismiss' => 'modal'}
            %span{:'aria-hidden' => 'true'} &times;
            %span.sr-only Close
          %h4.modal-title#newCategoryModalLabel New Category
        .modal-body
          = text_field_tag(:category_name, nil, placeholder: 'Please enter the new category name', class: 'form-control', required: true)
        .modal-footer
          %button.btn.btn-default{:type => 'button', :'data-dismiss' => 'modal'} Close
          = submit_tag('Submit', class: 'btn btn-primary')